package org.cytoscape.myapp.cytoscape_app_v1.internal.tasks.visual;

import org.cytoscape.myapp.cytoscape_app_v1.internal.model.InfoVisualOption;
import org.cytoscape.myapp.cytoscape_app_v1.internal.visual.VisualStyleDefault;
import org.cytoscape.work.Task;
import org.cytoscape.work.TaskMonitor;

public class VisualStyleTask implements Task{

	private VisualStyleDefault styleDefault;
	private InfoVisualOption infoVisualOption;
	
	public VisualStyleTask(VisualStyleDefault styleDefault,
			InfoVisualOption infoVisualOption) {
		super();
		this.styleDefault = styleDefault;
		this.infoVisualOption = infoVisualOption;
	}

	public void run(TaskMonitor taskMonitor) throws Exception {
		
		styleDefault.setVisualMappingAttribute(this.infoVisualOption.getEdgeWith(), this.infoVisualOption.getEdgeColor());
		styleDefault.setVisualMappingFunction();
		styleDefault.applyVisualStyle();
		
		
	}

	
	public void cancel() {
	
		
	}
	
	

}
